#while loop 1
i=1
while i < 10:
    k=1
    while k< i+1:
        print('{}*{}={}\t' .format(k,i,i*k),end='')
        k+=1
    print()
    i+=1
print("="*80)

#for loop 1
for i in range (1,10):
    for k in range (1,i+1):
        print('{}*{}={}\t'.format(k, i, i * k), end='')
    print('')
print("="*80)

#While loop 2
k=9
while k > 0 :
    i=1
    while i < k+1:
        print('{}*{}={}\t'.format(i, k, i * k), end='')
        i += 1
    print()
    k -= 1
print("="*80)

#for loop 2
for i in range (9,0,-1):
    for k in range (1,i+1):
        print('{}*{}={}\t'.format(i, k, i * k), end='')
    print()
print("="*80)

#While loop 3
i=1
while i < 10:
    b=1
    while b < 10-i:
        print(end='        ')
        b+=1
    k = i
    while k>0:
        print('{}*{}={}\t'.format(k, i, i * k), end='')
        k -= 1
    i += 1
    print()
print("="*80)

#for loop 3
for i in range(1,10,):
    for b in range(1,10-i):
        print(end='        ')
    for k in range (i,0,-1):
        print('{}*{}={}\t'.format(k, i, i * k), end='')
    print()
print("="*80)

#while loop 4
i=9
while i > 0:
    b=1
    while b < 10-i:
        print(end='        ')
        b+=1
    k = i
    while k>0:
        print('{}*{}={}\t'.format(k, i, i * k), end='')
        k -= 1
    i -= 1
    print()
print("="*80)
#for loop 4
for i in range(9,0,-1):
    for b in range(1,10-i):
        print(end='        ')
    for k in range (i,0,-1):
        print('{}*{}={}\t'.format(k, i, i * k), end='')
    print()
print("="*80)